#!/bin/bash

regions=("North America" "Europe" "Asia" "South America" "Africa")
while true
do
  userId=$RANDOM
  pageId=$((100 + RANDOM % 1000))
  viewTime=$(date +"%Y-%m-%d %T")
  userRegion=${regions[$RANDOM % ${#regions[@]}]}
  echo '{"user_id":'$userId',"page_id":'$pageId',"viewtime":"'$viewTime'","user_region":"'$userRegion'"}'
  sleep 1
done
